<?php
	class vanbandibs
	{
		public $MaVanBanDi = 0;
		public $SovaKyHieu = "";
		public $NgayBanHanh = "";
		public $NgayHetHan = "";
		public $TrichYeu = "";
		public $SoLuongPhatHanh = "";
		public $MaNguoiDung = 0;
		public $MaLoaiVanBan = 0;
		public $MaTrangThai = 0;
		public $NgayDangKy = "";
		public $NoiBanHanh = "";
		public $MaNguoiDangKy = 0;
		public $MaPhongBan = 0;
		public $DonViNgoai = "";
		
		public $HienTai = 0;
		
		public function Add()
		{
			$db = new vanbandidb();
			return $db->Add($this->SovaKyHieu, $this->TrichYeu, $this->MaLoaiVanBan,$this->NgayBanHanh,$this->NgayHetHan, $this->MaTrangThai, $this->NoiBanHanh, $this->MaNguoiDangKy, $this->MaPhongBan, $this->DonViNgoai, $this->MaNguoiDung);
		}
		
		public function Delete()
		{
			$db = new vanbandidb();
			return $db->Delete($this->MaVanBanDi);
		}
		
		public function Update()
		{
			$db = new vanbandidb();
			return $db->Update($this->MaVanBanDi, $this->SovaKyHieu, $this->TrichYeu, $this->MaLoaiVanBan,$this->NgayBanHanh,$this->NgayHetHan, $this->NoiBanHanh,  $this->MaPhongBan,  $this->DonViNgoai);
		}
	
		public function GetList()
		{
			$db = new vanbandidb();
			return $db->GetList($this->MaVanBanDi, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->TrichYeu, $this->MaLoaiVanBan, $this->MaTrangThai, $this->NgayDen, $this->NoiBanHanh, $this->MaNguoiDangKy, $this->MaPhongBan, $this->DonViNgoai);
		}
		
		public function PageList( $start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->PageList($this->MaVanBanDi, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->TrichYeu, $this->MaLoaiVanBan, $this->MaTrangThai, $this->NgayDen, $this->NoiBanHanh, $this->MaNguoiDangKy, $this->MaPhongBan, $this->DonViNgoai, $start, $limit);
		}
		
		public function GetTrangThaiVanBan()
		{
			$db = new vanbandidb();
			return $db->GetTrangThaiVanBan($this->MaTrangThai, $this->MaNguoiDuyet, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan,  $this->NoiBanHanh);
		}
		
		public function pageTrangThaiVanBan($start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->pageTrangThaiVanBan($this->MaTrangThai, $this->MaNguoiDuyet, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan,  $this->NoiBanHanh, $start,$limit);
		}
		
	
		
		public function ChangeTrangThai()
		{
			$db = new vanbandidb();
			return $db->ChangeTrangThai($this->MaVanBanDi, $this->MaNguoiDuyet,  $this->MaTrangThai);
		}
		
		public function getVanBanDenNguoiDung()
		{
			$db = new vanbandidb();
			return $db->getVanBanDenNguoiDung($this->MaNguoiDung, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan,  $this->NoiBanHanh);
		}
		
		public function pageVanBanDenNguoiDung($start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->pageVanBanDenNguoiDung($this->MaNguoiDung, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan,  $this->NoiBanHanh, $start,$limit);
		}
		
		public function getVanBanDenNguoiDangKy()
		{
			$db = new vanbandidb();
			return $db->getVanBanDenNguoiDangKy($this->MaNguoiDangKy, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh);
		}
		public function pageVanBanDenNguoiDangKy($start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->pageVanBanDenNguoiDangKy($this->MaNguoiDangKy, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh, $start,$limit);
		}
		
		public function getVanBanDenPhongBan()
		{
			$db = new vanbandidb();
			return $db->getVanBanDenPhongBan($this->MaPhongBan, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh);
		}
		
		public function pageVanBanDenPhongBan($start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->pageVanBanDenPhongBan($this->MaPhongBan, $this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh, $start,$limit);
		}
		
		public function getVanBanDenCongTy()
		{
			$db = new vanbandidb();
			return $db->getVanBanDenCongTy($this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh);
		}
		
		public function pageVanBanDenCongTy($start=0, $limit=15)
		{
			$db = new vanbandidb();
			return $db->pageVanBanDenCongTy($this->HienTai, $this->SovaKyHieu, $this->NgayBanHanh, $this->NgayHetHan, $this->NoiBanHanh, $start,$limit);
		}
		
	}
?>